package org.unideb.beerfactory.importer;

import java.io.Serializable;

import javax.annotation.PostConstruct;
import javax.faces.bean.ManagedBean;
import javax.faces.bean.ManagedProperty;
import javax.faces.bean.ViewScoped;

import org.unideb.beerfactory.order.LazyOrderModel;
import org.unideb.beerfactory.service.ManageOrderFacadeService;

@ViewScoped
@ManagedBean(name = "importerBean")
public class ImporterBean implements Serializable {

    private static final long serialVersionUID = 1L;
    
    @ManagedProperty(value = "#{manageOrderFacadeService}")
    private ManageOrderFacadeService manageOrderFacadeService;

    LazyOrderModel lazyOrderModel;
    
    @PostConstruct
    public void init() {
    	lazyOrderModel = new LazyOrderModel(manageOrderFacadeService);
    }

	public ManageOrderFacadeService getManageOrderFacadeService() {
		return manageOrderFacadeService;
	}

	public void setManageOrderFacadeService(
			ManageOrderFacadeService manageOrderFacadeService) {
		this.manageOrderFacadeService = manageOrderFacadeService;
	}

	public LazyOrderModel getLazyOrderModel() {
		return lazyOrderModel;
	}

	public void setLazyOrderModel(LazyOrderModel lazyOrderModel) {
		this.lazyOrderModel = lazyOrderModel;
	}
        
}
